**** Main Analyses for "Organizational Design and its Consequences for Administrative Reform: Historical Lessons from the U.S. Budget and Accounting Act of 1921" ****
 
 
* OPEN STATA OUTPUT FILE LOG *

cd "\Replication File Materials"
   
log using "Reported Models.smcl",replace



 * OPEN "HISTORICAL BUDGET" DATABASE CONTAINING NEW VARIABLES * 
 
use data_final.dta, clear 


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************




*** DECLARE DATABASE AS A PANEL (AGENCY ID * FISCAL YEAR): 

xtset agenid fyear, yearly

*
*
*



*** I. ESTIMATE EFFECT OF BAA REFORMS ON BUDGETARY CONTROL [BUDGETARY GROWTH AS DEPENDENT VARIABLE] ***



*** ESTIMATE EXECUTIVE BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateect
*
absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ecti

lincomest _cons + executiveagency
estimate store ecte
*
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateecr
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ecri

lincomest _cons + executiveagency
estimate store ecre

*
*
*
*
*** ESTIMATE CONGRESSIONAL BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecct
*
absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ccti

lincomest _cons + executiveagency
estimate store ccte
*
*
*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateccr

*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ccri

lincomest _cons + executiveagency
estimate store ccre

*** Creating Coefficient Plots for Budget Control Models***


*** Figure 1 ***
coefplot (ateect, rename(_cons="Executive Estimates (ATE)") \ ///
			atecct, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (ecte, rename((1)="Executive Estimates (ATE: E)") \ ///
			ccte, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (ecti, keep (_cons) rename(_cons="Executive Estimates (ATE: I)") \ ///
			ccti, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		  ,  bylabel(Total Budget)  ///
		  ||                       ///
		 (ateecr, rename(_cons="Executive Estimates (ATE)")\ ///
			ateccr, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (ecre, rename((1)="Executive Estimates (ATE: E)")\ ///
			ccre, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (ecri, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			ccri, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		  , bylabel(Regular Budget)   ///
		  || ,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ///
		  ciopts(recast(rcap)) nooffsets msize(medsmall) ///
		  order("Executive Estimates (ATE)""Congressional Appropriations (ATE)". ///
		  "Executive Estimates (ATE: E)" "Congressional Appropriations (ATE: E)". ///
		  "Executive Estimates (ATE: I)" "Congressional Appropriations (ATE: I)") ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		   title("Figure 1. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive and Legislative Budget Control", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure1.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure1.png", replace
		  
		  
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
		  
		  
		  
*** II. ESTIMATE DIFFERENCE-IN DIFFERENCES MODELS USING BUDGETARY STABILITY IN NATURAL LOGARITHMS AS DEPENDENT VARIABLE ***



*** ESTIMATE EFFECT OF BAA REFORMS ON EXECUTIVE BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateest
*
absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store esti

lincomest _cons + executiveagency
estimate store este

*
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateesr
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store esri

lincomest _cons + executiveagency
estimate store esre

*
*
*

*** ESTIMATE CONGRESSIONAL BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecst
*
absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store csti

lincomest _cons + executiveagency
estimate store cste
*
*
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecsr
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store csri

lincomest _cons + executiveagency
estimate store csre

*** Creating Coefficient Plots for Budget Stability Models***

*** Figure 2 ***
coefplot (ateest, rename(_cons="Executive Estimates (ATE)")\ ///
			atecst, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (este, rename((1)="Executive Estimates (ATE: E)")\ ///
				cste, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (esti, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			csti, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateesr, rename(_cons="Executive Estimates (ATE)")\ ///
			atecsr, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (esre, rename((1)="Executive Estimates (ATE: E)")\ ///
			csre, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (esri, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			csri, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w)  ///
		  ciopts(recast(rcap)) nooffsets msize(medsmall)                      ///
		  order("Executive Estimates (ATE)""Congressional Appropriations (ATE)". ///
		  "Executive Estimates (ATE: E)" "Congressional Appropriations (ATE: E)". ///
		  "Executive Estimates (ATE: I)" "Congressional Appropriations (ATE: I)") ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure 2. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive and Legislative Budget Stability", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure2.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure2.png", replace


	  
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
		  


*** III. ESTIMATE EFFECT OF BAA REFORMS ON EXECUTIVE-LEGISLATIVE BUDGETARY COHERENCE IN NATURAL LOGARITHMS (+1) AS DEPENDENT VARIABLE ***


*** ESTIMATE EXECUTIVE-CONGRESSIONAL BUDGET COHERENCE USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle 
estimate store atebct
*
absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store bcti

lincomest _cons + executiveagency
estimate store bcte
*
*
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atebcr
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store bcri

lincomest _cons + executiveagency
estimate store bcre
*
*
*
*** Creating Coefficient Plots for Budget Coherence Models***
*** Figure 3 ***
coefplot (atebct, rename(_cons="ATE: All Agencies")) ///
		 (bcte, rename((1)="ATE: Executive Agencies")) ///
		 (bcti, keep (_cons) rename(_cons="ATE: Independent Agencies")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (atebcr, rename(_cons="ATE: All Agencies")) ///
		 (bcre, rename((1)="ATE: Executive Agencies")) ///
		 (bcri, keep (_cons) rename(_cons="ATE: Independent Agencies")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure 3. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive-Legislative Budget Coherence", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure3.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure3.png", replace

	  
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
********************************************************************************************************************************************************************
		  



 * CLOSE LOG FILE

 log close

